package com.hollycrm.sipdemo;

import android.app.Application;

import com.hollycrm.sip.proxy.UserProxyHandler;
import com.hollycrm.sip.proxy.config.SPConfig;

import java.net.DatagramSocket;
import java.net.SocketException;

/**
 * Created by aber on 2017/2/21.
 */

public class MyApplication extends Application {

    @Override
    public void onCreate() {
        super.onCreate();
        try {
            DatagramSocket socket = new DatagramSocket(SPConfig.getInstance().port);
            UserProxyHandler handler = new UserProxyHandler(socket);
            new Thread(handler).start();
        } catch (SocketException e) {
            e.printStackTrace();
        }

    }

}
